import { HttpClient } from './HttpClient'
import { AggregateAPI } from './apis/modules/aggregate'
import { BaseAPI } from './apis/modules/base'
import { ColumnAPI } from './apis/modules/column'
import { CrudAPI } from './apis/modules/crud'
import { EntityAPI } from './apis/modules/entity'
import { NativeAPI } from './apis/modules/native'
import { QueryAPI } from './apis/modules/query'
import { TableAPI } from './apis/modules/table'
import { UsedAPI } from './apis/modules/used'

export default class SQLiteHttpSDK {
  private client: HttpClient
  public aggregate: AggregateAPI
  public base: BaseAPI
  public column: ColumnAPI
  public crud: CrudAPI
  public entity: EntityAPI
  public native: NativeAPI
  public query: QueryAPI
  public table: TableAPI
  public used: UsedAPI

  constructor(baseURL: string) {
    this.client = new HttpClient(baseURL)
    this.aggregate = new AggregateAPI(this.client)
    this.base = new BaseAPI(this.client)
    this.column = new ColumnAPI(this.client)
    this.crud = new CrudAPI(this.client)
    this.entity = new EntityAPI(this.client)
    this.native = new NativeAPI(this.client)
    this.query = new QueryAPI(this.client)
    this.table = new TableAPI(this.client)
    this.used = new UsedAPI(this.client)
  }
}